﻿using EFModel;
using IServices;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Y2.Filters;

namespace Y2.Controllers
{
    [LoginFilter]
    public class engage_resumeToController : Controller
    {
        private readonly Iengage_resume he;

        public engage_resumeToController(Iengage_resume he)
        {
            this.he = he;
        }

        public IActionResult engage_resumeTo()
        {
            return View();
        }

        public IActionResult engage_resumeUpdate()
        {
            return View("engage_resumeUpdate");
        }
        //简历登记表未推荐查询
        public async Task<IActionResult> Query(int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.Query(currentPage, pageSize)));
        }
        //简历登记表未推荐模糊查询
        public async Task<IActionResult> Like(engage_resume resume, int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.Like(resume,currentPage, pageSize)));
        }
    }
}
